/*
  GownFullObjectAdapter

  The abstract class for editable object.
  Some interfaces are adopted from Javascript Virtual Keyboard project.

  Visit http://debugger.ru/demo/projects/virtualkeyboard/demo_inline.html for Virtual Keyboard

  The code is licensed under LGPL.
*/
var GownFullObjectAdapter = Base.extend({
	obj: null,
	constructor: function(obj)
	{
		if(obj) {
			this.obj = obj;
			obj.GownFullObjectAdapter = this;
		}
	},
	clone: function(obj)
	{
		return new GownFullObjectAdapter(obj);
	},
	AttachHandler: function(keydown_handler,keypress_handler,keyup_handler,focus_handler,lostsel_handler) {},

	InvalidateStack: function(stack) {},
	Undo: function() {},
	Redo: function() {},
	DisableUndo: function(undop) {},

	GetContent: function() {},

	GetCursorXY: function() {},
	SendString: function(o,str) {},
	SendHTML: function(o,html) {},
	isHTML: function() { return false; },
	GetHTMLDocument: function() {},
	GetHTMLElement: function() {},
	SetHTMLElementEventById: function(id,event,handler) {},
	SetFocus: function() {},

	GetSelection: function() { return true; },
	RestoreSelection: function(sel) { return true; },

	SetSelection: function(start,end,relative) {},
	GetSelectionStart: function() {},
	GetSelectionEnd: function() {},
	InsertAtCursor: function(str,keep) {},
	DeleteAtCursor: function(after) {},
	DeleteSelection: function() {}
},
{
	GetAdapter: function(o)
	{
		if(o && o.GownFullObjectAdapter) return o.GownFullObjectAdapter;
		else return null;
	},
	ALL: 0,
	REDO: 1,
	UNDO: 2
});

